package com.gx.smart.building.ui.report

import android.content.Intent
import android.view.ViewGroup
import com.gx.smart.base.BaseMVVMActivityV3
import com.gx.smart.building.R
import com.gx.smart.building.databinding.ActivityFaultResultBinding
import com.gx.smart.building.ui.report.viewmodel.FaultReportViewModel

class FaultResultActivity : BaseMVVMActivityV3<FaultReportViewModel>() {
    private lateinit var viewBinding: ActivityFaultResultBinding

    override fun initContentView(root: ViewGroup?) {
        viewBinding = ActivityFaultResultBinding.inflate(layoutInflater, root, true)
    }

    override fun initData() {
        val id = intent.getStringExtra("id")
        viewBinding.detail.setOnClickListener {
            val intent = Intent(this, FaultDetailActivity::class.java)
            intent.putExtra("id", id)
            startActivity(intent)
        }
        viewBinding.home.setOnClickListener {
            finish()
        }
    }

    override fun getToolbarTitle(): String = "工单提交"

    override fun onBindViewModel(): Class<FaultReportViewModel> = FaultReportViewModel::class.java

    override fun onBindLayout(): Int = R.layout.activity_fault_result
}